package com.itheima.chapter08;

import java.util.ArrayList;
import java.util.Arrays;
//集合与数组对比
public class demo1 {
    public static void main(String[] args) {
        int[] arr={1,2,3,4};
        String[] str ={"a","b","c"};
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(str));
        ArrayList<String> list =new ArrayList<String>();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
        System.out.println(list);
        ArrayList<Integer> list1 =new ArrayList<>();
       // ArrayList<int> list2 =new ArrayList<>();
        list1.add(123);
        System.out.println(list1);
    }
}
